package com.karolak.sm.station.state;

import com.karolak.sm.StateMachine;
import com.karolak.sm.exception.TransitionException;
import com.karolak.sm.state.StateBase;
import com.karolak.sm.state.StateId;
import com.karolak.sm.station.StationConstants.ProductEvent;
import com.karolak.sm.station.StationConstants.StationEvent;

public class StationStateBase extends StateBase implements StationState {
	public StationStateBase(StateMachine stateMachine, StateId stateId) {
		super(stateMachine, stateId);
	}

	public void start() throws TransitionException {
		super.execute(StationEvent.START);
	}

	public void lock() throws TransitionException {
		super.execute(StationEvent.LOCK);
	}

	public void unlock() throws TransitionException {
		super.execute(StationEvent.UNLOCK);
	}

	public void stop() throws TransitionException {
		super.execute(StationEvent.STOP);
	}

	public void startProduct() throws TransitionException {
		super.execute(ProductEvent.START_PRODUCT);
	}

	public void finishProduct() throws TransitionException {
		super.execute(ProductEvent.FINISH_PRODUCT);
	}
}
